/* SPDX-License-Identifier: GPL-2.0-or-later */
/* Copyright(c) 2020 - 2023 Allwinner Technology Co.,Ltd. All rights reserved. */
/*
 * This confidential and proprietary software should be used
 * under the licensing agreement from Allwinner Technology.

 * Copyright (C) 2020-2030 Allwinner Technology Limited
 * All rights reserved.

 * Author:zhengwanyu <zhengwanyu@allwinnertech.com>

 * The entire notice above must be reproduced on all authorised
 * copies and copies may only be made to the extent permitted
 * by a licensing agreement from Allwinner Technology Limited.
 */
#ifndef __TC358743XBG_EDID_H_
#define __TC358743XBG_EDID_H_

static const unsigned char edid_data[] = {
    // EDID Block0, refers to E-EDID Standard 1.3
    0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, //Header

    //ID manufacture Name:"AWT",byte0[6:2]='A', byte1[7:5]+byte0[1:0]='W', byte0[4:0]='T'
//The value corresponds to english alphabetical order
0x06, 0xF3,

//ID Product Code:This is used to differentiate between different models
//from the same manufacturer, for example a model number.
//byte0:LSB byte1:MSB
0x01, 0x00,

//ID Serial Number:is used todifferentiate between individual instances of the
//same display model
0x01, 0x01, 0x01, 0x01,

//manufacture data: byte0:week  byte1:year, an offset from the year 1990
0x01, 0x1F,

//EDID version/reversion:1.3
0x01, 0x03,

//Basic Display Parameters and Features
//Video Input Definition
0x80,
//Max. Horizontal Image Size(cm)
0xA0,
//Max. Vertical Image Size(cm)
0x5A,
//Display Transfer Characteristic (Gamma)
0x78,
//Feature Support (DPMS)
0x0A,

//Phosphor or Filter Chromaticity
//Red/Green Low Bits
0xEE,
//Blue/White Low Bits
0x91,
//Red_x
0xA3,
//Red_y
0x54,
//Green_x
0x4C,
//Green_y
0x99,
//Blue_x
0x26,
//Blue_y
0x0F,
//White_x
0x50,
//White_y
0x54,

//Established Timings
0x00, 0x00, 0x00,

//Standard Timing: NOT USED
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01,

//Detailed Descriptor #1: Preferred Detailed Timing (1920x1080p@60Hz)
0x02, 0x3A, 0x80, 0x18, 0x71, 0x38, 0x2D, 0x40, 0x58, 0x2C,
0x45, 0x00, 0xFD, 0x1E, 0x11, 0x00, 0x00, 0x1E,

//Detailed Descriptor #2: Preferred Detailed Timing (720x480p@60Hz)
0x8C, 0x0A, 0xD0, 0x8A, 0x20, 0xE0, 0x2D, 0x10, 0x10, 0x3E,
0x96, 0x00, 0x13, 0x8E, 0x21, 0x00, 0x00, 0x1E,

//Monitor Descriptor
//byte3:tag FC means 'Monitor Name'
//byte5-byte17: ASCII  codes of 'AWT202101'
0x00, 0x00, 0x00, 0xFC, 0x00, 0x41, 0x57, 0x54, 0x32, 0x30,
0x32, 0x31, 0x30, 0x31, 0x0A, 0x20, 0x20, 0x20,

//Detailed Descriptor #3: Defined by Manufacturer
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

//Extension Block(s):1
0x01,

//Checksum value
0x3D,

//EDID Bloak1, refers to E-EDID Standard 1.3
//CEA-Extension Block
0x02,
//Revision Number: CEA-Extension Version 3
0x03,
//Detailed Timing Descriptor(s) Begin Offset
0x1D,

//Display Supports
//bit 7(underscan) = 1 if DTV monitor underscans ITvideo formats by default.
//bit 6(audio) = 1 if sink device supports basic audio
//bit 5(YCBCR4:4:4) = 1 if sink device supports YCBCR4:4:4 in addition to RGB
//bit 4(YCBCR4:2:2) = 1 if sink device supports YCBCR4:2:2 in addition to RGB
//lower 4 bits = total number of native DTDs
//(see CEA861-D Section 2.2 for definition of "Native Format")
0xE1,

//video data block, the VIC codes refers to
//CEA-861-D "Table 3 Video Formats-Video ID Code and Aspect Ratios"
//byte0[7:5]:tag, must be 0x2  byte0[4:0]:payload length
0x4A,
//640x480p60 4:3
0x01,
//720x480p60 4:3
0x02,
//720x480p60 16:9
0x03,
//1920x1080i60 16:9
0x05,
//1920x1080p60 16:9
//0x10,
//720x576p50 4:3
0x11,
//720x576p50 16:9
0x12,
//1280x720p50 16:9
0x13,
//1920x1080i50 16:9
0x14,
//1920x1080p50 16:9
0x1F,
//1280x720p60 16:9
0x04,

//Audio Data Block, refers to cea-861-d '7.5.2 Audio Data Block'
//length:3
//byte0[7:5]:tag, must be 0x2  byte0[4:0]:payload length
0x23,
//byte0[6:3]: Audio Format Code 1:LPCM 2:AC-3 ...
//byte0[2:0]: Max Number of channels - 1
0x09,
//sample rate: bit6~bit0:192k 176.4k 96k 88.2k 48k 44.1k 32k
0x17,
//sample bit: bits2~bit0: 24bit 20bit 16bit
0x07,

//Speaker Allocation Data Block
//byte0[7:5]:tag, must be 0x2  byte0[4:0]:payload length
0x83,
//FL/FR, left and right channel
0x01, 0x00, 0x00,

//Vendor Specific Data Block(VSDB)
//byte0[7:5]:tag, must be 0x2  byte0[4:0]:payload length
0x65,
0x03, 0x0C, 0x00, 0x01, 0x00,

//Detailed Descriptor #1: Detailed Timing (1920x1080@60Hz 16:9 Apsect Ratio)
0x02, 0x3A, 0x80, 0x18, 0x71, 0x38, 0x2D, 0x40, 0x58, 0x2C,
0x45, 0x00, 0xFD, 0x1E, 0x11, 0x00, 0x00, 0x1E,

//Detailed Descriptor #2: Detailed Timing (720x480@60Hz 16:9 Apsect Ratio)
0x8C, 0x0A, 0xD0, 0x8A, 0x20, 0xE0, 0x2D, 0x10, 0x10, 0x3E,
0x96, 0x00, 0xFD, 0x1E, 0x11, 0x00, 0x00, 0x18,

//Detailed Descriptor #3: Detailed Timing (1280x720@60Hz 16:9 Apsect Ratio)
0x01, 0x1D, 0x00, 0x72, 0x51, 0xD0, 0x1E, 0x20, 0x6E, 0x28,
0x55, 0x00, 0xFD, 0x1E, 0x11, 0x00, 0x00, 0x1E,

//Detailed Descriptor #4: Detailed Timing (720x576@50Hz 16:9 Apsect Ratio)
0x8C, 0x0A, 0xD0, 0x90, 0x20, 0x40, 0x31, 0x20, 0x0C, 0x40,
0x55, 0x00, 0xFD, 0x1E, 0x11, 0x00, 0x00, 0x18,

//Post DTD Padding
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

//Checksum Value
0xf6,
};

#endif
